package com.ruoyi.team.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.stream.Stream;

/**
 * 物品库存对象 goods_store
 *
 * @author khr
 * @date 2022-11-28
 */
@Data
@TableName("goods_store")
public class GoodsStore extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 物品id */
    @Excel(name = "物品id")
    private Long goodsId;

    /** 仓库id */
    @Excel(name = "仓库id")
    private Long storeId;

    /** 库存数量 */
    @Excel(name = "库存数量")
    private Long amounts;

    // 商品名称
    @TableField(exist = false)
    private String goodsName;

    // 品牌
    @TableField(exist = false)
    private String brandName;

    // 仓库名称
    @TableField(exist = false)
    private String storeName;

    // 分类 Id
    @TableField(exist = false)
    private Long categoryId;
    // 分类层级结构偶
    @TableField(exist = false)
    private String busiPath;

    // 物品图片
    @TableField(exist = false)
    private String goodsCover;

    // 出入库类型
    @TableField(exist = false)
    private Integer type;

    // 物品单价
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField(exist = false)
    private BigDecimal price;

    /** 进入库数量 */
    @TableField(exist = false)
    private Long inOutAmounts;

    /** 进入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date inOutBusiDate;
}
